Skip to content

fix: bridge buffer page helpers via cshim on PG16+#2331

Merged
eeeebbbbrrrr merged 1 commit into
pgcentralfoundation:developfrom
mrdrivingduck:fix/pg16-buffergetblock-cshim
Jun 23, 2026
Merged

fix: bridge buffer page helpers via cshim on PG16+#2331
eeeebbbbrrrr merged 1 commit into
pgcentralfoundation:developfrom
mrdrivingduck:fix/pg16-buffergetblock-cshim

Conversation

@mrdrivingduck

Copy link
Copy Markdown
Contributor

Summary

Use generated cshim bindings for BufferGetBlock and BufferGetPage on PostgreSQL 16 and newer when cshim is enabled. Keep the existing Rust fallback for older macro-only releases and for builds without cshim support.

Testing

  • cargo fmt
  • git diff --check
  • cargo check -p pgrx-bindgen
  • PGRX_PG_CONFIG_PATH=/opt/homebrew/opt/postgresql@18/bin/pg_config cargo check -p pgrx-pg-sys --no-default-features --features pg18

PG18 with cshim generated the expected BufferGetBlock__pgrx_cshim and BufferGetPage__pgrx_cshim wrappers locally, but full cshim compilation was blocked by a Homebrew PostgreSQL SDK path pointing at a missing MacOSX26.sdk.

Use generated shim bindings for the buffer page access helpers on
PostgreSQL releases where they are inline C functions, while preserving
the Rust fallback for older macro-only releases and builds without shim
support. This keeps no-shim feature combinations on the existing path
and lets shim-enabled newer releases follow the upstream header
implementation.
@eeeebbbbrrrr
eeeebbbbrrrr merged commit c6e40f7 into pgcentralfoundation:develop Jun 23, 2026
23 of 30 checks passed
eeeebbbbrrrr added a commit that referenced this pull request Jun 23, 2026
Welcome to pgrx v0.19.0. Among other things, this brings support for
Postgres v19beta1.

As usual, install cargo-pgrx with `cargo install cargo-pgrx --version
0.19.0 --locked`, and if you want Postgres 19beta1 support you'll also
need to run `cargo pgrx init`. And make sure to update your crate
dependencies with `cargo pgrx upgrade`.


## What's Changed

* add pg19beta1 support by @eeeebbbbrrrr in
#2303

The headline item. As more betas are released we'll release new pgrx
point releases supporting them.

* upgrade dependencies and rust edition to 2024 by @eeeebbbbrrrr in
#2312

Notably, pgrx wants to use the Rust 2024 edition now.

### cargo-pgrx

* fix(cargo-pgrx): preserve cargo rustflags for cdylib builds by
@eeeebbbbrrrr in #2304

Prior to this fix, RUSTFLAGS changes in `.cargo/config.toml` would have
been ignored.

* Retry Postgres downloads during init by @eeeebbbbrrrr in
#2314
* fix: `cargo pgrx schema named_sql_entity` should export
schema-qualified by @eeeebbbbrrrr in
#2310
* Replace cargo-edit with crates-index and toml_edit by @cbandy in
#2305
* feat(cargo-pgrx): accept Cargo VersionReq syntax for upgrade --to by
@isdaniel in #2321


### New Features

* Add #[pg_guc_hook] macro for simple GUC hooks by @cbandy in
#2323



### Postgres Bindings and Wrappers

* feat: expose PGLZ compression bindings + add pglz_inspect example by
@isdaniel in #2326
* fix: bridge buffer page helpers via cshim on PG16+ by @mrdrivingduck
in #2331
* Fix binding of `struct Port` on pg17 by @cbandy in
#2302
* feat: add Bytea<'fcx> argument type with zero-copy return by @isdaniel
in #2301
* Add wrappers for postgres geometric types. by @hamiltop in
#1332


### Bugfixes and Cleanup

* Guard pgrx docs.rs release builds by @eeeebbbbrrrr in
#2315
* Fix docs.rs build by localizing docsrs cfg by @eeeebbbbrrrr in
#2299
* remove redundant casts and improve safety in varlena functions by
@isdaniel in #2298
* Update trybuild to 1.0.116 by @cbandy in
#2306
* Quiet two errors from rust-analyzer by @cbandy in
#2307
* fix dependabot security warnings by @eeeebbbbrrrr in
#2313
* refactor: unify #[pg_extern] attribute parsing via syn by @isdaniel in
#2317
* chore: add examples PostgresType in/out variants and memory-context
patterns by @isdaniel in
#2318
* docs(spi): clarify SpiClient::select vs update for read-only vs
writable SPI by @uded in
#2328
* fix pg19 drift by @eeeebbbbrrrr in
#2330

## New Contributors

* @hamiltop made their first contribution in
#1332
* @uded made their first contribution in
#2328

**Full Changelog**:
v0.18.1...v0.19.0
@mrdrivingduck
mrdrivingduck deleted the fix/pg16-buffergetblock-cshim branch June 23, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants